﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Pyramid.Models
{
	/// <summary>
	/// 角色
	/// </summary>
	public class Role
	{
		[Display(Name = "序号")]
		public int RoleId { get; set; }

		[Display(Name = "角色名称")]
		[MaxLength(20)]
		public string RoleName { get; set; }

		[Display(Name = "描述")]
		[MaxLength(100)]
		public string Description { get; set; }

		[Display(Name = "用户类型限定")]
		public int UserTypes { get; set; }

		/// <summary>
		/// 拥有的权限ID列表（json序列化格式）
		/// </summary>
		[Display(Name = "权限设定")]
		public string FunctionCodes { get; set; }

		public virtual ICollection<Account> Accounts { get; set; }
	}
}